<template>
	<div class="lm-chatgpt-item">
		<chatgpt-item-header v-if="!isChat" text="正在为您生成结果：名片"></chatgpt-item-header>
		<div class="chatgpt-item-content">
			<div class="item-section-title">名片</div>
			<img :src="CallingCardImg"/>
			<div v-if="!isChat" class="bottom-ope">
				<h-button type="info" @click="postMessage" class="btn">转发</h-button>
			</div>
		</div>
	</div>
</template>

<script>
import ChatgptItemHeader from './chatgpt-item-header'
import CallingCardImg from '@/assets/images/calling-card.png'
import { mapState, mapMutations, mapActions } from "vuex"
export default {
	name: 'CallingCardItem',
	props: {
		item: Object,
		isChat: {
			type: Boolean,
			default: false
		}
	},
	components: {
		ChatgptItemHeader
	},
	data() {
		return {
			CallingCardImg
		}
	},
	computed: {
	},
	methods: {
		...mapActions('lm-chat', ['postMsg']),
		// 发送
		postMessage() {
			this.postMsg({
				msg_side: "1",
				aicc_msg_type: "callingCard",
				aicc_msg_content: {
					title: '名片'
				}
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.chatgpt-item-content{
	.item-section-title{
		margin-bottom: 12px;
	}
	.bottom-ope{
		text-align: right;
		margin-top: 16px;
		.btn{
			border-radius: 4px;
		}
	}
}
</style>